Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
Why "perf report" does not show function names in the second run, when used in docker?

I am trying to profile ffmpeg using the Linux perf command in docker. In the first run, the output is fine with all function names displayed by "perf report". In the second run, it only shows addresses rather than function names. I am using a script that runs the ffmpeg twice in a docker.

The commands used in the script is:

perf record ffmpeg -y -i input.mp4 -c:v libx264 -b:v 1500k output1.mp4

sleep 5

perf record ffmpeg -y -i input.mp4 -c:v libx264 -b:v 1500k output1.mp4

The command to run the script:

docker run -it --privileged -v $(pwd):/cwd myDocker:someTag /cwd/my_script.sh

I noticed in the second run, it cannot find the libx264 library in perf.data.

The outputs of "perf report" are shown below. Any kind of help is greatly appreciated.

Output 1:

# Overhead  Command  Shared Object       Symbol
# ........  .......  ..................  .........................................................
#

 6.35%  ffmpeg   libx264.so.148      [.] x264_cabac_block_residual_rd_internal_ssse3_lzcnt
 3.91%  ffmpeg   libx264.so.148      [.] x264_cabac_encode_decision_bmi2
 3.70%  ffmpeg   ffmpeg              [.] quantize_and_encode_band_cost_UPAIR
 2.94%  ffmpeg   libx264.so.148      [.] x264_me_search_ref

Output 2:

# Overhead  Command  Shared Object       Symbol
# ........  .......  ..................  .........................................................
#

 1.00%  ffmpeg    (deleted)         [.] 0x00000000000c6e87
 0.90%  ffmpeg    (deleted)         [.] 0x00000000000c82c1
 0.71%  ffmpeg    (deleted)         [.] 0x00000000000c82e2
 0.69%  ffmpeg    (deleted)         [.] 0x00000000000c6e98

I appreciate it if someone can provide a clue.

Thank you in advance.

EDIT 1: I also read How can I get perf to find symbols in my program. That post does not answer my question as it does not address my situation.

EDIT 2: I also looked at perf can find symbol in the kernel ,but can not find symbol in my program. How to fix it?. The setting for my experiment is correct.

EDIT 3: When I run the script outside container, both iterations work perfectly fine. The only problem is when I run in in the docker container.

EDIT 4: After the first run, I ensured that both the binary and shared library object are visible to the ls and stat commands.

EDIT 5: After the first run, I ensured that both the binary and shared library object are visible to the nm and objdump commands. In addition, these commands show correct symbols.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda